<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置不同元素的高度和宽度</title>
</head>

<body>
    <style>
        img.one {
            height: auto;
        }

        img.two {
            height: 200px;
            width: 200px;
        }

        div.three {
            height: 300px;
            width: 300px;
            background-color: powderblue;
        }
    </style>
    </head>
    <h1>设置元素的高度和宽度</h1>

    <p>原始图像：</p>
    <img class="one" src="/图片/eg_sun.gif" width="300" height="300"><br>

    <p>尺寸调整后的图像 (200x200 像素)：</p>
    <img class="two" src="/图片/eg_merglobe.gif" width="300" height="300"><br>

    <p>这个 div 的高度和宽度是 300px：</p>
    <div class="three"></div>
</body>

</html>